# for Arch Linux
pkgname=shairport-git
pkgver=1.0
pkgrel=5
pkgdesc="An AirPlay-compatible audio receiver"
url='http://github.com/abrasive/shairport'
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
license=('public-domain')
groups=('daemons')
depends=('openssl' 'alsa-lib')
optdepends=(
	'libao: sound support'
	'pulseaudio: sound support'
	'avahi: zeroconf support'
)
provides=('shairport')
conflicts=('shairport')
install='shairport.install'
source=(git://github.com/abrasive/shairport.git)
md5sums=('SKIP')

build() {
    cd "${srcdir}/shairport"
    make
}

package() {
    cd "${srcdir}/shairport"
    make PREFIX="${pkgdir}/usr" install
    install -d -m 755 "${pkgdir}/usr/lib/systemd/system/"
    install -m 644 "scripts/arch/shairport.service" "${pkgdir}/usr/lib/systemd/system/shairport.service"
}
